<%@tag description="page layout"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib tagdir="/WEB-INF/tags" prefix="sb"%>
<%@attribute name="head" fragment="true"%>
<%@attribute name="sidebar" fragment="true"%>
<%@attribute name="title" required="true" type="java.lang.String"%>
<%@attribute name="script" required="false" type="java.lang.String"%>
<%@attribute name="stylesheet" required="false" type="java.lang.String"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Pragma" content="no-cache"></meta>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
<title>${title}</title>
<style type="text/css">
@import url("<c:url value="/style/style.css"/>");
<c:forTokens var="item" items="${stylesheet}" delims=",">
    @import url("<c:url value="/style/${item}"/>");
</c:forTokens>
</style>

<c:forTokens var="item" items="${script}" delims=",">
<script type="text/javascript" src="<c:url value="/script/${item}"/>">
</script>
</c:forTokens>    
<%--
	Insert head fragment from page
--%>
<jsp:invoke fragment="head" />
</head>
<body>
<div id="page">
	<div id="sidebar">
		<jsp:invoke fragment="sidebar" />
	</div>
<div id="content">
	<jsp:doBody />
</div>
</div>
</body>
</html>